package org.example.backend.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * 邮箱验证DTO
 */
@Data
@ApiModel(description = "邮箱验证请求参数")
public class EmailDTO {

    @ApiModelProperty(value = "QQ邮箱", required = true)
    @NotBlank(message = "邮箱不能为空")
    @Email(message = "邮箱格式不正确")
    @Pattern(regexp = "^[a-zA-Z0-9_-]+@qq\\.com$", message = "请输入QQ邮箱")
    private String email;

    @ApiModelProperty(value = "验证码")
    private String code;
} 